package com.smart.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.smart.common.PageInfo;
import com.smart.model.domain.OperateRoleDO;
import com.smart.model.request.OperateRoleRequest;
import com.smart.model.request.RoleAddRequest;
import com.smart.model.request.RoleUpdateRequest;
import com.smart.model.vo.OperateRoleVO;

import java.util.List;

/**
 * @author zhanghong
 */
public interface OperateRoleService extends IService<OperateRoleDO> {

    /**
     * 根据主键查询
     * @param id
     * @return
     */
     OperateRoleVO getByKey(long id);
    /**
     * 分页查询，手动分页
     * @param request
     * @return
     */
    PageInfo<OperateRoleVO> pageQuery(OperateRoleRequest request);
    /**
     * 列表查询
     * @param request
     * @return
     */
    List<OperateRoleVO> listQuery(OperateRoleRequest request);
    /**
     * 新增
     * @param request
     * @return
     */
    Boolean add(RoleAddRequest request);
    /**
     * 根据主键更新
     * @param request
     * @return
     */
    Boolean updateByKey(RoleUpdateRequest request);

    /**
     * 删除角色
     * @param roleId
     * @return
     */
    Boolean remove(long roleId);
}
